<?php
include('function/connection.php');
include('function/function.php');

$q = strtolower($_GET["q"]);
if (!$q) return;
$sql="SELECT * FROM  tbl_products";
$result=mysql_query($sql);
  while ($row = mysql_fetch_object($result)) {
  	if (strpos(strtolower($row->pd_code ), $q) !== false) {
		echo "$row->pd_code \n";
 	}
 }
?>